@import './theme/default';
@import './theme/font';
$count-height: 18px;
$dot-diameter: 8px;

.zent-badge {
  position: relative;
  display: inline-block;
  vertical-align: middle;

  .zent-badge-count {
    @include theme-color(background-color, badge, bg);
    @include theme-color(color, stroke, 9);
    @include theme-color(border-color, stroke, 9);
    display: inline-block;
    height: $count-height;
    min-width: $count-height;
    line-height: $count-height - 2px;
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
    border-radius: 40px;
    text-align: center;
    padding: 0 4px;
    font-size: $font-size-small;

    &-num {
      display: block;
      transform: scale(0.83);
    }
  }

  .zent-badge-dot {
    @include theme-color(border-color, stroke, 9);
    @include theme-color(background-color, badge, bg);
    display: inline-block;
    height: $dot-diameter;
    width: $dot-diameter;
    border-radius: 50%;
    border-width: 1px;
    border-style: solid;
    font-size: 0;
  }

  &.zent-badge--no-content {
    font-size: 0;

    .zent-badge-count {
      padding-top: 1px;
      padding-bottom: 1px;
    }

    .zent-badge-count,
    .zent-badge-dot {
      margin: 0 8px;
      border: 0;
    }
  }

  &.zent-badge--has-content {
    .zent-badge-count {
      position: absolute;
      top: -4px;
      right: -6px;
    }

    .zent-badge-dot {
      position: absolute;
      top: 0;
      right: 0;
    }
  }
}
